#include "app_buffer.h"
#include <stdio.h>
#include "log/log.h"
int main(int argc, char const *argv[])
{
    Buffer *buffer = app_buffer_init(12);
    app_buffer_write(buffer, "Hello", 5);
    app_buffer_write(buffer, "World", 5);
    char read_buffer1[10];
    int buf_len1=app_buffer_read(buffer,read_buffer1, 10);
    log_info("first data:%.*s\n",buf_len1, read_buffer1);
    char read_buffer2[10];
    int buf_len2=app_buffer_read(buffer,read_buffer2, 10);
    log_info("second data:%.*s\n",buf_len2, read_buffer2);
    char read_buffer3[10];
    int buf_len3=app_buffer_read(buffer,read_buffer3, 10);
    log_info("third data:%.*s\n",buf_len3, read_buffer3);
    return 0;
}
